import http from '@/utils/http' // 导入export const http中创建的axios实例

export const httpFiles = (params?: object) => {
    return http.get('/files', {
        params
    })
}
export const httpFileTree = () => {
    return http.get('/tree')
}
export const httpFileSearch = (params?: object) => {
    return http.get('/search', {
        params
    })
}
export const httpFileDelete = (params: object) => {
    return http.delete('/file', {
        params
    })
}
export const httpFileDetail = (params: object) => {
    return http.get('/file', {
        params
    })
}
export const httpFileCreate = (data: object) => {
    return http.post('/create', data)
}
export const httpFileUpload = (data: object) => {
    return http.post('/upload', data)
}
export const httpFileEdit = (data: object) => {
    return http.put('/file', data)
}
export const httpFileMd = (url: string) => {
    return http.get(url)
}

